import Vue from "vue"
import VueRouter from 'vue-router'

Vue.use(VueRouter)


// const menu = () => import("../layout/header/menu.vue")

const serchContenr = () => import("../views/serchContenr/serchContenr.vue")
 const user = () => import("../views/userHome/user.vue")
//一级菜单系列
  const home = () => import("../views/home/home.vue")
  const mymusic = () => import("../views/mymusic/mymusic.vue")
    const playlist = () => import("../views/mymusic/mymusic_child/song.vue")
    const Radio = () => import("../views/mymusic/mymusic_child/dj.vue")
    const mv = () => import("../views/mymusic/mymusic_child/video.vue")
    const artist = () => import("../views/mymusic/mymusic_child/artist.vue")
  const friend= () => import("../views/friend/friend.vue")
  const download = () => import("../views/download/download.vue")
  const product = () => import("../views/product/product.vue")
  const level = () => import("../views/Level/Level.vue")
//二级菜单系列
  const discover_toplist = () => import("../views/home/toplist/toplist.vue")
  const discover_playlist = () => import("../views/home/playlist/playlist.vue")
  const discover_djradio = () => import("../views/home/diantai/diantai.vue")
  const discover_artist = () => import("../views/home/geshou/geshou.vue")
  const discover_NewAlbum = () => import("../views/home/xindieshangjia/xindieshangjia.vue")
//歌单详情 
 const home_playlist =() => import("../views/home/exhibition/exhibition.vue")
 const home_album = () => import("../views/home/album/album.vue")
 const home_song = () => import("../views/home/song/song.vue")
 const artistDetails = () => import("../views/home/artist/artist.vue")
 const program = () => import("../views/home/program/program.vue")
 const djradio =() => import("../views/home/djradio/djradio.vue")
export default new VueRouter({
     mode:"history",
    routes:[
        {
            path:"/",
            redirect:"/home",
        },
        {
          path:"/home",
          component:home,
          name:"Home",
          meta:{
            overflow : "scroll",
            headerIndex:'0',
            menuIndex:"0",
            keepAlive:true
          }
        },
        {
            path:"/my",
            component:mymusic,
            meta:{
              overflow : "hidden",
              headerIndex:'1',
              keepAlive:false
            },
            children:[
              {
                path:"/my/playlist",
                component:playlist,
                meta:{
                  overflow : "hidden",
                  headerIndex:'1',
                  keepAlive:false
                }
              },
              {
                path:'/my/Radio',
                component:Radio,
                meta:{
                  overflow : "hidden",
                  headerIndex:'1',
                  keepAlive:true,
                }
              },
              {
                path:"/my/mv",
                component:mv,
                meta:{
                  overflow : "hidden",
                  headerIndex:'1',
                  keepAlive:true
                }
              },
              {
                path:"/my/artist",
                component:artist,
                meta:{
                  overflow : "hidden",
                  headerIndex:'1',
                  keepAlive:true
                }
              }
            ]
        },
        {
            path:"/friend",  //朋友
            component:friend,
            meta:{
              overflow : "scroll",
              headerIndex:'2',
              keepAlive:false
            }
        },
        {
            path:"/download", //下载
            component:download,
            meta:{
              overflow : "scroll",
              headerIndex:'4',
              keepAlive:true
            }
        },
        {
            path:"/product",   //商城
            component:product,
            meta:{
              overflow : "scroll",
              headerIndex:'3',
              keepAlive:false
            }
        },
        {
          path:"/serchContenr",   //搜索内容
          component:serchContenr,
          meta:{
            overflow : "scroll",
            headerIndex:'5',
            keepAlive:false
          }
         },
         {
          path:"/userLevel",   //用户等级
          component:level,
          meta:{
            overflow : "scroll",
            headerIndex:'6',
            keepAlive:true
          }
        },
        {
          path:"/home/discover", //推荐
          component:home,
          meta:{
            overflow : "scroll",
            menuIndex:"0",
            keepAlive:true
          }
        },
        {
            path:"/home/discover/toplist",//推荐->排行榜
            component:discover_toplist,
            meta:{
              overflow : "scroll",
              menuIndex:"1",
              keepAlive:false
            }
        },
        {
          path:"/home/discover/playlist", //推荐->歌单
          component:discover_playlist,
          meta:{
            overflow : "scroll",
            menuIndex:"2",
            keepAlive:false
          }
        },
        {
          path:"/home/discover/djradio", //推荐->主播电台
          component:discover_djradio,
          meta:{
            overflow : "scroll",
            menuIndex:"3",
            keepAlive:false
          }
        },
        {
          path:"/home/discover/artist",//推荐->歌手
          component:discover_artist,
          meta:{
            overflow : "scroll",
            menuIndex:"4",
            keepAlive:false
          }
        },
        {
          path:"/home/discover/NewAlbum", //推荐->新碟上架
          component:discover_NewAlbum,
          meta:{
            overflow : "scroll",
            menuIndex:"5",
            keepAlive:false
          }
        },
        {
          path:"/home/playlist",  //歌单详情
          component:home_playlist,
          meta:{
            overflow : "scroll",
            menuIndex:"6",
            headerIndex:'0',
            keepAlive:false
          }
        },
        {
          path:"/home/album",  //专辑详情
          component:home_album,
          meta:{
            overflow : "scroll",
            menuIndex:"7",
            keepAlive:false
          }
        },
        {
          path:"/home/song",  //歌曲详情
          component:home_song,
          meta:{
            overflow : "scroll",
            menuIndex:"8",
            keepAlive:false
          }
        },
        {
          path:"/userHome",  //用户主页
          component:user,
          meta:{
            overflow : "scroll",
            menuIndex:'9',
            keepAlive:false
          }
        },
        {
          path:"/userEvent",  //用户主页_动态
          component:user,
          meta:{
            overflow : "scroll",
            menuIndex:'9',
            keepAlive:false
          }
        },
        {
          path:"/userFollows",  //用户主页_关注
          component:user,
          meta:{
            overflow : "scroll",
            menuIndex:'9',
            keepAlive:false
          }
        },
        {
          path:"/userFans",  //用户主页_粉丝
          component:user,
          meta:{
            overflow : "scroll",
            menuIndex:'9',
            keepAlive:false
          }
        },
        {
          path:"/home/artistDetails",  //歌手主页
          component:artistDetails,
          meta:{
            overflow : "scroll",
            menuIndex:'10',
            keepAlive:false
          }
        },
        {
          path:"/home/program",  //电台节目详情
          component:program,
          meta:{
            overflow : "scroll",
            menuIndex:'11',
            keepAlive:false
          }
        },
        {
          path:"/home/djradio",  //电台目录详情
          component:djradio,
          meta:{
            overflow : "scroll",
            menuIndex:'12',
            keepAlive:false
          }
        }
    ]
})